﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using ShiziEntity.User;
using ShizirDAL.User;

namespace ShizirBLL.User
{
    /// <summary>
    /// 用户基类逻辑层
    /// </summary>
    public class UserBaseBiz
    {
        private UserBaseData uba = new UserBaseData();

        /// <summary>
        /// 判断用户是否存在
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns>存在true，不存在返回false</returns>
        public bool Exists(string userName)
        {
            return uba.Exists(userName);
        }

        /// <summary>
        /// 获取用户信息实体
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns>用户信息实体</returns>
        public UserBase GetUserBaseEntity(string userName)
        {
            return uba.GetUserBaseEntity(userName);
        }

        /// <summary>
        /// 保存用户基类
        /// </summary>
        /// <param name="user">用户实体</param>
        /// <param name="userID">用户编号</param>
        /// <returns>操作结果</returns>
        public bool SaveUserBase(UserBase user, ref int userID)
        {
            return uba.SaveUserBase(user, ref userID);
        }
    }
}